/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.sys.entity.user;

import com.thinkgem.jeesite.modules.hk.sys.entity.goods.HkGoods;
import com.thinkgem.jeesite.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 用户物品管理Entity
 * @author 罗天文
 * @version 2018-03-14
 */
public class HkUserGoods extends DataEntity<HkUserGoods> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户id
	private HkGoods goods;		// 物品id
	private String state;		// 状态
	private int num;

	public HkUserGoods() {
		super();
	}

	public HkUserGoods(String id){
		super(id);
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public HkGoods getGoods() {
		return goods;
	}

	public void setGoods(HkGoods goods) {
		this.goods = goods;
	}
	
	@Length(min=0, max=1, message="状态长度必须介于 0 和 1 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}
}